package per.liu.main;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import per.liu.model.pojo.Deal;
import per.liu.model.pojo.User;
import per.liu.service.DealService;

import java.util.List;

/**
 * Created by Administrator on 2015/2/11.
 */
public class MybatisMain {

	public static void main(String[] args) {

		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:spring/*.xml");
		DealService dealService = applicationContext.getBean(DealService.class);
		Deal deal = dealService.findDeal(1);
		User user = dealService.findUser(1);
		dealService.updateDealTestREQUIRES_NEWTransactionInDaoException(user, deal);

	}

}
